import re
# 组
a = 'pythonpythonpythonpythonpythonpythonpython'

r = re.findall('(python){2}', a)
print(r)
